<template>
    <div class="tip_comtainer">
        <section class="tip_text_container">
            <div class="tip_icon">
                <span></span>
                <span></span>
            </div>
            <p class="tip_text">{{alertText}}</p>
            <slot name="twoBtn">
                <div class="confrim" @click="closeTip">确认</div>
            </slot>
        </section>
    </div>
</template>

<script>
export default {
    props:['alertText'],
    methods:{
        closeTip(){
            this.$emit('close')
        }
    }
}
</script>

<style lang="scss" scoped>
@import '~@styl/mixin.scss';
@keyframes scaleAni {
    0%{
        transform: scale(1)
    }
    35%{
        transform: scale(0.8)
    }
    75%{
        transform: scale(1.1)
    }
    100%{
        transform: scale(1)
    }
}
.tip_comtainer{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 999;
    .tip_text_container{
        position: absolute;
        top: 50%;
        left: 50%;
        width: 10rem;
        animation: scaleAni 0.3s;
        margin-top: -5rem;
        margin-left: -5rem;
        background-color: rgba(255,255,255,1);
        border: 1px;
        border-radius: 0.25rem;
        padding-top: .6rem;
        @include fj(center);
        align-items: center;
        flex-direction: column;
        .tip_icon{
            @include wh(2.5rem,2.5rem);
            border: 0.15rem solid #f8cb86;
            border-radius: 50%;
            @include fj(center);
            align-items: center;
            flex-direction: column;
            span:nth-of-type(1){
                background: #f8cb86;
                @include wh(.12rem, 1.1rem);
            }
            span:nth-of-type(2){
                margin-top: 0.2rem;
                background: #f8cb86;
                @include wh(.2rem, 0.2rem);
                border-radius: 50%;
            }
        }
        .tip_text{
            @include sc(0.7rem,#333);
            line-height: 0.9rem;
            text-align: center;
            margin-top: .8rem;
            padding: 0 .4rem;
        }
        .confrim{
            @include sc(0.8rem,#fff);
            font-weight: bold;
            margin-top: .8rem;
            background-color: #4cd964;
            width: 100%;
            text-align: center;
            line-height: 1.8rem;
            border: 1px;
            border-bottom-left-radius: 0.25rem;
            border-bottom-right-radius: 0.25rem;
        }
    }
}
</style>